- @project_group_links.each do |group_links|
  - shared_group = group_links.group
  - shared_group_users_count = group_links.group.group_members.count
  .panel.panel-default
    .panel-heading
      Shared with
      %strong #{shared_group.name}
      group, members with
      %strong #{group_links.human_access}
      role (#{shared_group_users_count})
      - if can?(current_user, :admin_group, shared_group)
        .panel-head-actions
          = link_to group_group_members_path(shared_group), class: 'btn btn-sm' do
            %i.fa.fa-pencil-square-o
            Edit group members
    %ul.content-list
      = render partial: 'shared/members/member',
               collection: shared_group.group_members.order(access_level: :desc).limit(20),
               as: :member,
               locals: { show_controls: false, show_roles: false }
      - if shared_group_users_count > 20
        %li
          and #{shared_group_users_count - 20} more. For full list visit #{link_to 'group members page', group_group_members_path(shared_group)}
